#ifndef MYRECTITEM_H
#define MYRECTITEM_H
#include"Head.h"

class MyRectItem : public QObject,public QGraphicsRectItem
{Q_OBJECT
public:
    MyRectItem(qreal x, qreal y, qreal width, qreal height);
    MyRectItem(QGraphicsRectItem &x);
    QGraphicsTextItem* textItem;

protected:
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    void setPos(const QPointF& pos);

signals:
    void positionChanged();
    void selectedchanged(QString msg);

};





#endif // MYRECTITEM_H
